<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<h3>iterator标签库</h3>
<a href="itAction">简单List集合</a>


<h3>1.提交普通属性</h3>
    <s:form action="helloAction">
    <s:textfield name="name" label="用户名"/>
    <s:textfield name="age" label="年龄"/>
    <s:submit value="注册"/>
    </s:form>
<h3>2.封装实体参数</h3>
    <s:form action="helloAction">
    <s:textfield name="user.username" label="用户名"/>
    <s:textfield name="user.password" label="密码"/>
    <s:textfield name="user.birthday" label="出生日期"/>
    <s:submit value="注册"/>
    </s:form>    
 <h3>3.封装实体参数到数组对象 OGNL</h3>
    <s:form action="helloAction">
    <s:textfield name="users[0].username" label="用户1姓名" value="孙悟空"/>
    <s:textfield name="users[0].password" label="用户1密码" value="111111"/>
    <s:textfield name="users[0].birthday" label="用户1生日" value="2017-07-01"/>
    <s:textfield name="users[1].username" label="用户2姓名" value="猪八戒"/>
    <s:textfield name="users[1].password" label="用户2密码" value="22222"/>
    <s:textfield name="users[1].birthday" label="用户2生日" value="2017-07-02"/>
    <s:textfield name="users[2].username" label="用户3姓名" value="沙悟净"/>
    <s:textfield name="users[2].password" label="用户3密码" value="3333333"/>
    <s:textfield name="users[2].birthday" label="用户3生日" value="2017-07-03"/>
    <s:submit value="注册"/>
    </s:form>    
</body>
</html>